<div class="clearfix user-center-head">
  <strong class="pull-left normal"><?php echo L('request_record')?></strong>
  <a href="<?php echo url('user/order_purchase_list');?>" class="pull-right btn"><?php echo L('aftermarket_recoud')?></a>
</div>
<table class="table-list">
  <tr>
    <th width="10%"><?php echo L('product_image');?></th>
    <th width="30%"><?php echo L('product_name');?></th>
    <th width="10%"><?php echo L('price');?></th>
    <th width="20%"><?php echo L('order_time');?></th>
    <th width="30%"><?php echo L('operate');?></th>
  </tr>
  <?php foreach ($ordersList as $k => $order) : ?>
  <?php if (isset($order['productList']) && $order['productList']):?>
  <?php foreach ($order['productList'] as $product): ?>
  <tr> 
    <td><img src="<?php echo $product['small_img']?>" width="60" height="60" /></td>
    <td><?php echo $product['product_name']?></td>
    <td><?php echo currency($product['pay_price'])?></td>
    <td><?php echo isset($order['start_time']) && $order['start_time'] ? date('Y-m-d H:i', $order['start_time']) : null ;?></td>
    <td>
      <?php if($product['purchase_status']):?>
      <input type="button" class="btn btn-purchase" onclick="javascript:location.href='<?php echo url('user/order_purchase_edit', array('pur_id' => $product['purchase_id']));?>';" value="<?php echo L('show_request')?>">
      <?php else:?>
      <input type="button" class="btn btn-purchase" onclick="javascript:location.href='<?php echo url('user/order_purchase_add', array('oiid' => $product['orders_items_id']));?>';" value="<?php echo L('submit_request')?>">
      <?php endif;?>
    </td>
    <?php endforeach;?>
    <?php endif;?>
  </tr>
  <?php endforeach;?>
</table>
<div class="page"><?php echo $pageShow;?></div>